home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / ip20t21a.lha / IFX20to21a_Patch / Patches2.lha / Rexx / AutoFX / EOT_Ripple.ifx < prev    next >
Text File  |  1995-04-18  |  994b  |  46 lines

  1. /*
  2.  * EOT_Ripple.ifx
  3.  * Written by Thomas Krehbiel
  4.  *
  5.  * Simple wave distort effect.
  6.  *
  7.  * Inputs:
  8.  *    Word(Arg(1),1) = Frame number (1 - N)
  9.  *    Word(Arg(1),2) = Main filename ("-" if not specified)
  10.  *    Word(Arg(1),3) = Swap filename ("-" if not specified)
  11.  *    Word(Arg(1),4) = Sequence number (?)
  12.  *    Word(Arg(1),5) = Total number of frames (N)
  13.  *
  14.  * Returns:
  15.  *    0 if successful, non-zero on failure
  16.  *
  17.  */
  18.  
  19. OPTIONS RESULTS
  20.  
  21. framenum = Word(Arg(1),1)
  22. mainname = Word(Arg(1),2)
  23. swapname = Word(Arg(1),3)
  24. seqnum   = Word(Arg(1),4)
  25. framemax = Word(Arg(1),5)
  26.  
  27. base  = 'Autofx_Ripple_'
  28.  
  29. x1    = GETCLIP(base||'x1')
  30. y1    = GETCLIP(base||'y1')
  31. size  = GETCLIP(base||'size')
  32. ampl  = GETCLIP(base||'ampl')
  33.  
  34. GetMain
  35. IF rc ~= 0 THEN EXIT rc
  36. PARSE VAR result name width height .
  37.  
  38. IF x1 = -1 THEN x1 = width%2
  39. IF y1 = -1 THEN y1 = height%2
  40.  
  41. /* linear interpolation */
  42. a = 360 * (framenum-1) / (framemax-1)
  43.  
  44. Hook Wave Amplitude ampl Length size Angle a CenterX x1 CenterY y1 AntiAlias
  45. EXIT rc
  46.